﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace repliback4.Net.Protocol.Messages.Attributes {
    /// <summary>
    /// 
    /// </summary>
    [AttributeUsage( AttributeTargets.Class, Inherited = false, AllowMultiple = false )]
    public class RequestTag : Attribute {
        //static RequestTag ( ) { }
        protected String name;
        protected String nameSpace;
        protected Type type;
        protected String prefix;
        public RequestTag ( String name, String nameSpace, Type type ) {
            this.prefix = "";
            this.name = name;
            this.nameSpace = nameSpace;
            this.type = type;
        }

        public RequestTag ( String prefix, String name, String nameSpace, Type type ) {
            this.prefix = prefix;
            this.name = name;
            this.nameSpace = nameSpace;
            this.type = type;
        }

        public String Name {
            get { return this.name; }
        }

        public String Namespace {
            get { return this.nameSpace; }
        }

        public String Prefix {
            get { return this.prefix; }
        }

        public Type Type {
            get { return this.type; }
        }

    }

    [AttributeUsage( AttributeTargets.Class, Inherited = false, AllowMultiple = false )]
    public class RequestStanza : RequestTag {
        static RequestStanza ( ) { }
        public RequestStanza ( String name, String nameSpace, Type type ) : base( name, nameSpace, type ) { }
        public RequestStanza ( String prefix, String name, String nameSpace, Type type ) : base( prefix, name, nameSpace, type ) { }
    }

    [AttributeUsage( AttributeTargets.Class, Inherited = false, AllowMultiple = false )]
    public class RequestStream : RequestTag {
        static RequestStream ( ) { }
        public RequestStream ( String name, String nameSpace, Type type ) : base( name, nameSpace, type ) { }
        public RequestStream ( String prefix, String name, String nameSpace, Type type ) : base( prefix, name, nameSpace, type ) { }

    }
    
    #region :: Depricated ::
    
/*
    public class RequestAttr : Attribute {
        protected string name;
        public string Name {
            get {
                return this.name;
            }
        }
        public RequestAttr ( String name ) {
            this.name = name;
        }
    }
    public class Request : RequestAttr {
        public Request ( string name )
            : base( name ) {

        }
    }

    public class RequestClass : RequestAttr {
        public RequestClass ( string name )
            : base( name ) {

        }
    }

    public class Field : RequestAttr {
        public Field ( string name )
            : base( name ) {

        }
    }

    public class Attr : RequestAttr {
        public Attr ( string name )
            : base( name ) {
        }
    }
    
*/
    #endregion

}
